from django.contrib import admin
from polls.models import Question,Choice

class ChoiceInline(admin.TabularInline):
	model = Choice
	extra = 3

class QuestionAdmin(admin.ModelAdmin):
	# fields = ["question_text", "pub_date"]
	fieldsets = [
	('问题', {'fields':['question_text']}),
	('出版日期',{'fields':['pub_date'],'classes':['collapse']}),
	]
	inlines = [ChoiceInline]

# Register your models here.
admin.site.register(Question,QuestionAdmin)